import Vue from 'vue'
import VueRouter from 'vue-router'
import Show from '../views/Show.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Show',
    component: Show,
    redirect:'/ShowAll',
    children:[
      {
        path: '/ShowAll',
        name: 'ShowAll',
        component: () => import(/* webpackChunkName: "about" */ '../views/ShowAll.vue')
      }, ]
    
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
  ,
  {
    path: '/ZhuCe',
    name: 'ZhuCe',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/ZhuCe.vue')
  }
  ,
  {
    path: '/Index',
    name: 'Index',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Index.vue')
  }
  ,
  {
    path: '/ShopingCar',
    name: 'ShopingCar',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/ShopingCar.vue')
  }
  ,
  {
    path: '/GoodsParticulars/:id',
    name: 'GoodsParticulars',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/GoodsParticulars.vue')
  }
  ,
  {
    path: '/Order',
    name: 'Order',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Order.vue')
  }
  ,
  {
    path: '/MenyPay',
    name: 'MenyPay',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/MenyPay.vue')
  }
  
]

const router = new VueRouter({
  routes
})

export default router
